home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Algorithms for Image Analysis
/
Practical Algorithms for Image Analysis.iso
/
CH_4.4
/
XFM
/
MOM_IO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1999-09-11
|
845b
|
43 lines
/*
* mom_io.c
*
* Practical Algorithms for Image Analysis
*
* Copyright (c) 1997, 1998, 1999 MLMSoftwareGroup, LLC
*/
/*
* MOM(ents)_IO.C
*
* routines for fileio, related to moment evaluation
*/
#include "xfm.h"
/*
* write file for plotting by routine plot_mom
*/
void
write_mdt_file (fpOut, m, mdim, m00, mu00, mu11, mu02, mu20, xc, yc, rg, dent)
FILE *fpOut;
int mdim;
float **m;
double m00, mu00, mu11, mu02, mu20;
double xc, yc, rg, dent;
{
int i, j;
fprintf (fpOut, "%d \n", mdim);
fprintf (fpOut, "%f %f\n", mu00, mu11);
fprintf (fpOut, "%f %f\n", mu02, mu20);
fprintf (fpOut, "%f %f\n", rg, dent);
fprintf (fpOut, "%f\n", m00);
for (i = 0; i < mdim; i++) {
for (j = 0; j < (int) mdim; j++) {
fprintf (fpOut, "%f\n", *(m[i] + j));
}
fprintf (fpOut, "\n");
}
}